@extends('home/myhouse/layout')
@section('title','我的订单')
@section('content')
    <div class="mod-main mod-comm lefta-box" id="order02">
        <div class="mt">
            <a name="none" class="service"></a>
            <ul class="extra-l">

                <li class="fore1"><a href="/home/myhouse/order?" class="txt">全部订单</a></li>
                <li><a href="/home/myhouse/order?state=1" clstag='click|keycount|orderinfo|waitPay' class="txt">待付款</a></li>
                <li><a href="/home/myhouse/order?state=2" id="ordertoReceive" clstag='click|keycount|orderinfo|waitReceive' class="txt">待收货</a></li>
                <li><a href="/home/myhouse/order?state=3" id="ordertoComment" class="txt" clstag='click|keycount|orderinfo|daipingjia'>待评价</a></li>
                <li class="fore2"><a href="/home/myhouse/order?state=0" clstag='click|keycount|orderlist|dingdanhuishouzhan' class="ftx-03" id="ordertoRecycle">订单回收站</a></li>

            </ul>
            <div class="extra-r">
                <div class="search">
                    <form method="get" action="/home/myhouse/order">
                        <input id="ip_keyword" type="text" class="itxt" name="keywords" value="订单号" onfocus="this.value='';" onblur="if(this.value==''){this.value='订单号'}">
                        <button>搜索</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="mc">
            <table class="td-void order-tb">
                <colgroup>
                    <col class="number-col">
                    <col class="consignee-col">
                    <col class="amount-col">
                    <col class="status-col">
                    <col class="operate-col">
                </colgroup>
                <thead>
                    <tr>
                        <th><div class="ordertime-cont">
                                <div class="time-txt">近三个月订单<b></b><span class="blank"></span></div>
                                <div class="time-list">
                                    <ul>
                                        <li><a href="#none" _val="1&s=4096" clstag="click|keycount|orderlist|zuijinsangeyue"  class="curr" ><b></b>近三个月订单</a></li>
                                        <li><a href="#none" _val="2&s=4096" clstag="click|keycount|orderlist|jinniannei" ><b></b>今年内订单</a></li>
                                        <li><a href="#none" _val="2015&s=4096" clstag="click|keycount|orderlist|2015" ><b></b>2015年订单</a></li>
                                        <li><a href="#none" _val="2014&s=4096" clstag="click|keycount|orderlist|2014" ><b></b>2014年订单</a></li>
                                        <li><a href="#none" _val="2013&s=4096" clstag="click|keycount|orderlist|2013" ><b></b>2013年订单</a></li>
                                        <li><a href="#none" _val="3&s=4096" clstag="click|keycount|orderlist|before_2013" ><b></b>2013年以前订单</a></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="order-detail-txt ac">订单详情</div>
                        </th>
                        <th>收货人</th>
                        <th>金额</th>
                        <th>
                            <div class="deal-state-cont" id="orderState">
                                <div class="state-txt">全部状态<b></b><span class="blank"></span></div>
                                <div class="state-list">
                                    <ul>
                                        <li value="4096">
                                            <a href="#none" clstag='click|keycount|orderlist|quanbuzhuangtai' class="curr"><b></b>全部状态</a>
                                        </li>
                                        <li value="1">
                                            <a href="#none" clstag='click|keycount|orderlist|dengdaifukuan'><b></b>等待付款</a>
                                        </li>
                                        <li value="128" clstag='click|keycount|orderlist|dengdaishouhuo'>
                                            <a href="#none"><b></b>等待收货</a>
                                        </li>
                                        <li value="1024">
                                            <a href="#none" clstag='click|keycount|orderlist|yiwancheng'><b></b>已完成</a>
                                        </li>
                                        <li value="-1">
                                            <a href="#none" clstag='click|keycount|orderlist|yiquxiao'><b></b>已取消</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </th>
                        <th>操作</th>
                    </tr>
                </thead>
        {{--循环体--}}
            @foreach($data as $v)
                    <tbody id="tb-19170561658">
                <tr class="sep-row"><td colspan="5"></td></tr>

                <tr class="tr-th">
                    <td colspan="5">
                        <span class="gap"></span>
                        <span class="dealtime" title="2016-05-17 12:45:31">{{date('Y-m-d H:i:s',$v -> otime)}}</span>
                        {{--<input type="hidden" id="datasubmit-19170561658" value="2016-05-17 12:45:31"/>--}}

                         <span class="number">订单号：<a name='orderIdLinks' id='idUrl19170561658' target='_blank' href='#' clstag='click|keycount|orderinfo|order_num'>{{$v->order_id}}</a>
	                                </span>
                        <div class="tr-operate">
                	                        <span class="order-shop">
                            <a href="#none" target="_blank" class="shop-txt venderName51168" clstag='click|keycount|orderlist|51168'></a>
                            <a class="btn-im venderChat51168" href="#none" target='_blank' title="联系卖家"  clstag='click|keycount|orderinfo|chatim'></a>
                        </span>

                        <span class="tel">
                            <i class="tel-icon venderTel51168"></i>
                        </span>
                            <a href="#none" clstag='click|keycount|orderlist|dingdanshanchu' class="order-del" _orderid="19170561658" _passkey="6CEEE7FCE71ADC574DAE211975A38B22"></a>
                        </div>
                    </td>
                </tr>

                <tr class="tr-bd" id="track19170561658" oty="22,4,70">
                    <td>
                    @foreach($v -> res as $val)
                            {{--{{$val->title}}--}}
                                {{--@foreach($val as $arr)--}}

                            <div class="goods-item p-1791984719">
                                <div class="p-img">
                                    <a href="/single/{{$val->pro_id}}" clstag="click|keycount|orderinfo|order_product" target="_blank">
                                        <img class="err-product" src="/uploads/product/logo_pic/{{$val->logo_pic}}" title="" data-lazy-img="" width="60" height="60">

                                    </a>
                                </div>
                                <div class="p-msg">
                                    <div class="p-name">
                                        <a href="" class="a-link" clstag="click|keycount|orderinfo|order_product" target="_blank" title="">{{$val->title}}</a>
                                    </div>
                                    <div class="p-extra">
                                        <ul class="o-info">
                                            <li><span class="o-match J-o-match" data-sku="1791984719"><i></i><em>找搭配</em></span></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="goods-number">
                                X{{$val->buynum}}
                            </div>
                                <div class="goods-repair">
                                    <a href="//myjd.jd.com/repair/ordersearchlist.action?searchString=19170561658" target="_blank" clstag="click|keycount|orderinfo|order_repair">返修/退换货</a>
                                </div>
                                <div class="clr"></div>
                    @endforeach
                    </td>
                    <td rowspan="1">
                                <div class="pc">
                                    <strong>{{$v->consignee}}</strong>
                                    <p>{{$v->con_region_add}}-{{$v->con_address}}</p>
                                    <p>{{$v->con_phone}}</p>
                                </div>
                                <div class="p-arrow p-arrow-left"></div>
                    </td>
                    <td rowspan="1">
                        <div class="amount">
                            <span>总额 &yen;{{$v->total_price}}</span> <br>
                            <span class="ftx-13">{{$v->pay_mod_id}}</span>
                        </div>
                    </td>
                    <td rowspan="1">
                        <div class="status">
                    <span class="order-status">
            	{{$v->total_price}}
                    </span>
                            <br>
                            <a href="/home/myhouse/order/show/{{$v->order_id}}" clstag='click|keycount|orderlist|dingdanxiangqing' target="_blank">订单详情</a>

                            <br>
                            {{$v->ord_state}}

                        </div>
                    </td>
                    <td rowspan="1" id="operate19170561658">
                        <div class="operate">
                            <div id="pay-button-19170561658" _baina="0"></div>

                            <a href="/comment/take/pay/{{$v->order_id}}" clstag="click|keycount|orderlist|buy"><b></b>立即购买</a><br><br>
                            @if($v->state_n==1)
                                <a href="/comment/take/pay/{{$v->order_id}}" clstag="click|keycount|orderlist|buy"><b></b>立即支付</a><br>
                                <a href="/comment/take/delete/{{$v->order_id}}" clstag="click|keycount|orderlist|buy"><b></b>删除订单</a>
                            @elseif($v->state_n==4)
                            <a href="/comment/take/edit/{{$v->order_id}}" clstag="click|keycount|orderlist|buy"><b></b>立即评价</a>
                            @elseif($v->state_n==5)
                            <a href="" clstag="click|keycount|orderlist|buy"><b></b>追加评价</a><br>
                            <a href="/comment/take/delete/{$v->order_id}" clstag="click|keycount|orderlist|buy"><b></b>删除订单</a>
                            @endif

                        </div>
                    </td>
                </tr>

                </tbody>
            @endforeach
        {{--循环体结束--}}
            </table>
            <div class="mt20">
                <div class="pagin fr">

                    <!--  <span class="text">共4条记录</span>    <span class="text">共1页</span> -->
                    <span class="prev-disabled">上一页<b></b></span>

                    <!-- <span class="prev-disabled">首页</span> -->
                    <a class="current">1</a>                                                                                       	<!-- <span class="next-disabled">末页</span>  -->
                    <span class="next-disabled">下一页<b></b></span>

                </div>
                <div class="clr"></div>
            </div>
            <div class="ui-slidebar" clstag='click|keycount|orderinfo|xqchangjianwenti'>
                <div class="dl">

                    <div class="dd">
                        <ul>
                            <li>
                                <a href="#none" class="backtop"></a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        $('.state-txt').mousemove(function () {
            $(this).next().css('display','block');
        }).mouseout(function(){
            $(this).next().css('display','none');
        });
    </script>

@stop